package sample.mybatis.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import sample.mybatis.domain.User;
import sample.mybatis.mapper.UserMapper;


/**
 * User的Service
 *
 * @author 小翼
 * @version 1.0.0
 */
@Service
public class UserService {

	@Autowired
	private UserMapper userMapper;

	public User readUserByUsername(String username){
//		return userMapper.selectUsername(username);

		User u = userMapper.selectUser(username);
		/*out.println(
				"\n\n\n\n" +
				u.toString()
				+ "\n\n\n\n"
		);*/
		return u;
	}

	public User readUserFullByUsername(String username){
		User u = userMapper.selectUserFull(username);
		/*out.println(
				"\n\n\n\n" +
				u.toString()
				+ "\n\n\n\n"
		);*/
//		return userMapper.selectUserFull(username);
		return u;
	}

	public User readAllByUsername(String username){
//		return userMapper.selectAllInfo(username);
		return null;
	}

}
